Optimal. Leaf size=52 \[ \frac {x}{a}-\frac {i \cosh (c+d x)}{a d}-\frac {i \cosh (c+d x)}{a d (1+i \sinh (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 52, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {2825, 12, 2814,
2727} \begin {gather*} -\frac {i \cosh (c+d x)}{a d}-\frac {i \cosh (c+d x)}{a d (1+i \sinh (c+d x))}+\frac {x}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 2727
Rule 2814
Rule 2825
Rubi steps
\begin {align*} \int \frac {\sinh ^2(c+d x)}{a+i a \sinh (c+d x)} \, dx &=-\frac {i \cosh (c+d x)}{a d}+\frac {i \int \frac {a \sinh (c+d x)}{a+i a \sinh (c+d x)} \, dx}{a}\\ &=-\frac {i \cosh (c+d x)}{a d}+i \int \frac {\sinh (c+d x)}{a+i a \sinh (c+d x)} \, dx\\ &=\frac {x}{a}-\frac {i \cosh (c+d x)}{a d}-\int \frac {1}{a+i a \sinh (c+d x)} \, dx\\ &=\frac {x}{a}-\frac {i \cosh (c+d x)}{a d}-\frac {i \cosh (c+d x)}{d (a+i a \sinh (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.17, size = 59, normalized size = 1.13 \begin {gather*} \frac {\cosh (c+d x) \left (\frac {\sinh ^{-1}(\sinh (c+d x))}{\sqrt {\cosh ^2(c+d x)}}+\frac {-2-i \sinh (c+d x)}{-i+\sinh (c+d x)}\right )}{a d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.91, size = 86, normalized size = 1.65
method | result | size |
risch | \(\frac {x}{a}-\frac {i {\mathrm e}^{d x +c}}{2 a d}-\frac {i {\mathrm e}^{-d x -c}}{2 a d}-\frac {2 i}{d a \left ({\mathrm e}^{d x +c}-i\right )}\) | \(60\) |
derivativedivides | \(\frac {\frac {8 i}{8 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-8}-\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-\frac {i}{\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1}+\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-\frac {2}{-i+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}}{a d}\) | \(86\) |
default | \(\frac {\frac {8 i}{8 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-8}-\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-\frac {i}{\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1}+\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-\frac {2}{-i+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}}{a d}\) | \(86\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 74, normalized size = 1.42 \begin {gather*} \frac {d x + c}{a d} + \frac {-5 i \, e^{\left (-d x - c\right )} + 1}{2 \, {\left (i \, a e^{\left (-d x - c\right )} + a e^{\left (-2 \, d x - 2 \, c\right )}\right )} d} - \frac {i \, e^{\left (-d x - c\right )}}{2 \, a d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.39, size = 69, normalized size = 1.33 \begin {gather*} \frac {{\left (2 \, d x - 1\right )} e^{\left (2 \, d x + 2 \, c\right )} + {\left (-2 i \, d x - 5 i\right )} e^{\left (d x + c\right )} - i \, e^{\left (3 \, d x + 3 \, c\right )} - 1}{2 \, {\left (a d e^{\left (2 \, d x + 2 \, c\right )} - i \, a d e^{\left (d x + c\right )}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.16, size = 99, normalized size = 1.90 \begin {gather*} \begin {cases} \frac {\left (- 2 i a d e^{2 c} e^{d x} - 2 i a d e^{- d x}\right ) e^{- c}}{4 a^{2} d^{2}} & \text {for}\: a^{2} d^{2} e^{c} \neq 0 \\x \left (\frac {\left (- i e^{2 c} + 2 e^{c} + i\right ) e^{- c}}{2 a} - \frac {1}{a}\right ) & \text {otherwise} \end {cases} - \frac {2 i}{a d e^{c} e^{d x} - i a d} + \frac {x}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.44, size = 63, normalized size = 1.21 \begin {gather*} \frac {\frac {2 \, {\left (d x + c\right )}}{a} - \frac {i \, e^{\left (d x + c\right )}}{a} - \frac {{\left (5 \, e^{\left (d x + c\right )} - i\right )} e^{\left (-d x - c\right )}}{a {\left (-i \, e^{\left (d x + c\right )} - 1\right )}}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.30, size = 59, normalized size = 1.13 \begin {gather*} \frac {x}{a}-\frac {2{}\mathrm {i}}{a\,d\,\left ({\mathrm {e}}^{c+d\,x}-\mathrm {i}\right )}-\frac {{\mathrm {e}}^{c+d\,x}\,1{}\mathrm {i}}{2\,a\,d}-\frac {{\mathrm {e}}^{-c-d\,x}\,1{}\mathrm {i}}{2\,a\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________